<%--
  Created by IntelliJ IDEA.
  User: ChadZhao
  Date: 11-6-17
  Time: 下午1:56
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>南京地税廉政网</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #666;
}
body {
	margin-top: 10px;
}
.form1 { width:99%; padding:5px;}
.form1 th { text-align:right; font-weight:bold; padding:5px;}
.form1 td { text-align:left; padding:5px;}
.listinput { border:1px solid #ccc; padding:3px; background-image:url(<c:url value='/images/listinputbg.gif'/>); width:200px;height:23px;}
.select1  { border:1px solid #ccc; padding:3px;}
button { background-image:url(<c:url value='/images/butbg.gif'/>); height:30px; line-height:30px; color:#FFFFFF; font-weight:bold; border:0px; cursor:hand;}
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" marginwidth="0">
<form method="post">
    <jsp:include page="top.jsp"/>
<table width="1080" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td>
            <div style='float:left'><img height="14" src="<c:url value='/frame/book1.gif'/>" width="20"/>&nbsp;修改密码
            </div>
            <div style='float:right;padding-right:8px;'>
                <!--  //保留接口  -->
            </div>
        </td>
    </tr>
    <tr>
        <td height="1" background="<c:url value='/frame/sp_bg.gif'/>" style='padding:0px'></td>
    </tr>
</table>
    <br>
    <table width="680"  border="0" align="center" cellpadding="0" cellspacing="0" class="form1">
              <tr style="height:20px;">
                <th style="width:45%;">&nbsp;</th>
                <td>&nbsp;</td>
              </tr>
              <tr style="height:40px;">
                <th>原始密码</th>
                <td><input type="password" name="userPassword" id="oldPassword" class="listinput" style="width:150px;"/></td>
              </tr>
              <tr>
              <tr style="height:40px;">
                <th>新密码</th>
                <td><input type="password" name="newPassword" id="newPassword" class="listinput" style="width:150px;"/></td>
              </tr>
              <tr style="height:40px;">
                <th>重复新密码</th>
                <td><input type="password" name="newPassword2" id="newPassword2" class="listinput" style="width:150px;"/></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td><button type="button" id="saveBt" class="submit1" style="width:50px;" onclick="doChange()">确定</button></td>
              </tr>
            </table>
    <div style="text-align:center;"><font color="red">
                            <s:property value="mess" id="mess"/>
                        </font></div>
    <div style="height:100px;"></div>
    <jsp:include page="bottom.jsp"/>
    </form>
</body>

<script>

    function doChange(){
        if(document.getElementById("oldPassword").value==""){
            alert("请输入旧密码！");
            return;
        }
        if(document.getElementById("newPassword").value==""){
            alert("请输入新密码！");
            return;
        }
        if(document.getElementById("newPassword2").value==""){
            alert("请输入重复新密码！");
            return;
        }
        if(document.getElementById("newPassword").value!=document.getElementById("newPassword2").value){
            alert("两次输入的新密码不相符！");
            return;
        }
        if(!confirm("您确定修改密码吗？")){
            return;
        }
        document.forms[0].action="<c:url value='/system/doChangePassword.do'/>";
        document.forms[0].submit();
    }
</script>
</html>